package com.ling.springbootinit.common;

import lombok.Data;

import java.io.Serializable;

/**
 * 通用返回类
 *
 */
@Data
public class SongDetailResponse<T,E> implements Serializable {

    private int code;

    private T privileges;

    private E songs;

    public SongDetailResponse(int code, T result, E result2) {
        this.code = code;
        this.privileges = result;
        this.songs = result2;
    }

    public SongDetailResponse(ErrorCode errorCode) {
        this(errorCode.getCode(), null, null);
    }


}
